var navDAL =require('../model/navDAL')
var qs = require('querystring')
var url = require('url')

var navcontroller ={
    img:function(req,res){
        var uid=req.query.uid;
        var users={uid:uid}
        navDAL.img(users,function(err,results){
            if(err){
                console.log('数据查询错误')
                res.json({code:500,msg:'数据查询错误'})
            }else{
                // console.log('查完数据')
                // console.log(results)
                if(results[0]){
                    // console.log("1")
                    res.json({code:200,msg:'ok',data:results,results})
                }
                else{
                    res.json({code:200,msg:'ok',data:0})
                }
                
            }
        })
    }
}
module.exports = navcontroller